package com.wish.wishsystem_management.controller;


import com.wish.wishsystem_management.entity.SysRole;
import com.wish.wishsystem_management.service.ISysRoleDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vo.ResultEntity;

import java.util.List;

/**
 * <p>
 * 角色与部门对应关系 前端控制器
 * </p>
 *
 * @author zhaiwj
 * @since 2021-03-22
 */
@RestController
@RequestMapping("/sysRoleDept")
public class SysRoleDeptController {

    @Autowired
    private ISysRoleDeptService iSysRoleDeptService;

    @RequestMapping("/getAllRoles")
    public ResultEntity getAllRoles(Long deptId) {
        List<SysRole> sysRoles = iSysRoleDeptService.queryListByDeptId(deptId);
        return ResultEntity.ok("200", "查询成功", sysRoles);
    }


}

